﻿using System.Configuration;

namespace com.hyrentals.webcommon.configuration
{
    public class ContentConcatCollection : ConfigurationElementCollection
    {
        protected override ConfigurationElement CreateNewElement()
        {
            return new ContentConcatElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((ContentConcatElement)(element)).Pkg;
        }

        public ContentConcatElement this[int index]
        {
            get
            {
                return (ContentConcatElement)BaseGet(index);
            }
        }

        [ConfigurationProperty("mode", IsRequired = true)]
        public string Mode
        {
            get
            {
                return (string)this["mode"];
            }
            set
            {
                this["mode"] = value;
            }
        }

        [ConfigurationProperty("maxFiles", IsRequired = true)]
        public int MaxFiles
        {
            get
            {
                return (int)this["maxFiles"];
            }
            set
            {
                this["maxFiles"] = value;
            }
        }
    }
}
